// START SNIPPET: EventDaoHibernate
package nothing.dao.hibernate;

import nothing.model.Event;
import nothing.dao.EventDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class EventDaoHibernate extends GenericDaoHibernate<Event, Long> implements EventDao {

    public EventDaoHibernate() {
        super(Event.class);
    }

    @SuppressWarnings("unchecked")
    public List<Event> findByName(String name) {
        return getHibernateTemplate().find("from Event where name=?", name);
    }
}
// START SNIPPET: EventDaoHibernate

